package com.mtgg.req;

import com.mtgg.entity.User;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.BeanUtils;

@ApiModel
public class UserReq {
    private Long id;
    @ApiModelProperty("名字")
    private String name;
    @ApiModelProperty("用户id")
    private String userId;
    private Integer age;
    public User req2Entity(){
        return new User()
                .setAge(age)
                .setId(id)
                .setName(name);
    }

    public Integer getAge() {
        return age;
    }

    public UserReq setAge(Integer age) {
        this.age = age;
        return this;
    }

    public Long getId() {
        return id;
    }

    public UserReq setId(Long id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public UserReq setName(String name) {
        this.name = name;
        return this;
    }

    public String getUserId() {
        return userId;
    }

    public UserReq setUserId(String userId) {
        this.userId = userId;
        return this;
    }

}
